﻿<!DOCTYPE html>
<html lang="zh-cn">
	<include file="Public:header" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Home/email/completer.css"/>         
<script src="__PUBLIC__/Home/email/completer.min.js"></script>
<script type="text/javascript">
    $(function() {
        $("#email").completer({
            separator: "@",
            source: ["qq.com", "163.com", "126.com", "139.com", "gmail.com", "hotmail.com", "icloud.com"]
        });       

    });
</script>
	<body>
		<include file="Public:top" />
		<br />
		<div class="container">
			<div class="">
				<ul class="bread">
					<h4>
					<li><a href="#" class="icon-home"> 首页</a> </li>					
					<li><a href="#">留言板</a></li>
					</h4>
				</ul>
			</div>
			<div class="line-big">
				<div class="xl12 xm8">
					<div class="line-small">
						<div class="xs12">
							<volist name="list" id="vo">
								<div class="clearfix articlebox">
									<div class="liuyan_a">
									</div>
									<div class="said_img">
										<img src="{$vo.photo}" class="radius-circle" width="60px" height="60px" />
										<div class="liuyan_t">
											<span class="icon-user"></span>&nbsp;&nbsp;<a>{$vo.username}</a>&nbsp;&nbsp;</span>
											<span class="icon-paper-plane"></span>&nbsp;{$vo.add_time|tranTime}&nbsp;&nbsp;</span>
											<span class="tag bg-dot">{$vo.from}</span>&nbsp;&nbsp;<span class="icon-map-marker"></span>&nbsp;{$vo.ip}
										</div>
										<div class="liuyan_c">
											{$vo.content}
										</div>

									</div>

									<!--回复-->
									<if condition="$vo.c_content neq ''">
									<div class="f_liuyan">
										<hr />
										<div class="liuyan_a">
										</div>
										<div class="said_img">
											<img src="__ROOT__/Uploads/{$vo['c_photo']}" class="radius-circle" width="60px" height="60px" />
											<div class="liuyan_t">
												<span class="icon-user"></span>&nbsp;&nbsp;管理员&nbsp;&nbsp;</span>
												<span class="icon-paper-plane"></span>&nbsp;&nbsp;{$vo.c_time|tranTime}&nbsp;&nbsp;
												<span>回复 @<a>{$vo.username}</a> 中说到：</span>
											</div>
											<div class="liuyan_c">
												{$vo.c_content}
											</div>
										</div>
									</div>
									</if>
								</div>
								<br />
							</volist>
							<br />
							<div class="pages" style=" text-align: right;">
								{$page}
							</div>
							<br />
							<hr />

							<div class="panel border-sub">
								<div class="panel-head border-sub bg-sub">
									<h3>留  言</h3>
								</div>
								<div class="panel-body">
									<div class="panel-body">
										<form action="{:U('Home/liuyan/addContent')}" name="signupForm" id="signupForm" method="post" class="form form-block">							
											<div class="form-group">
												<div class="field">
													<div class="input-group">
														<span class="addon">昵称</span>
													<input type="text" class="input" id="username" name="username" value="{$qqname}" readonly="readonly" placeholder="请输入昵称" />
												</div>
												</div>
											</div>
											<div class="form-group">
												<div class="field">
													<div class="input-group">
														<span class="addon">邮箱</span>
													<input type="text" class="input"  id="email" name="email" placeholder="请输入正确的邮箱地址" />
												</div>
												</div>
											</div>
											<div class="form-group">
												<div class="field">
													<textarea class="input" rows="5" name="content" id="content" cols="50" placeholder="说点什么吧...."></textarea>
												</div>
											</div>
											<div class="form-group">
												<div class="field">
													<div class="input-group">
														<span class="addon">验证码</span>
													<input type="text" style="width: 300px;" class="input" id="txt_check" name="txt_check" placeholder="请输入右侧验证码" />
													<img style="margin-top: -32px;margin-left: 50%;display: block;border: 1px solid #C7C7C7;" class="img" src="{:U('Home/Liuyan/verify')}" onClick="this.src = this.src + '?' + Math.random();" title="看不清楚?点击刷新验证码?">
												</div></div>
											</div>
											<div class="form-button">
												<button class="button bg-blue button-big button-block" id="btn-submit" type="submit">
													提 交</button>
											</div>
										</form>
									</div>
								</div>
							</div>
							<br />
						</div>
						<hr />
					</div>
					<br />
					<br />
					<br />
				</div>
				<include file="Public:right" />
			</div>
		</div>
		<include file="Public:footer" />
		<script>
	
		$(function(){

		    $('#btn-submit').click(function(){
		    	var node ="{$qqname}";

		     	if( node =='' || node == null){ 
				 	layer.alert("为防止恶意刷屏，请使用QQ登录后文明留言!",{icon: 5,}); 
				 	return false;
				 }
				if( '' == $.trim($('#username').val())){
					layer.alert('昵称不能为空', {icon: 5});
					return false;
				}
				if( '' == $.trim($('#email').val())){
					layer.alert('邮箱地址不能为空', {icon: 5});
					return false;
				}
				if( '' == $.trim($('#content').val())){
					layer.alert('您还没说点什么呢！', {icon: 5});
					return false;
				}

				 return true;
		    });		    
		})

	</script>
	</body>

</html>